home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 3.2 KB | 115 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWRRcShp.h
- // Release Version: $ 1.0d11 $
- //
- // Copyright: © 1993, 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWRRCSHP_H
- #define FWRRCSHP_H
-
- #ifndef FWSHAPE_H
- #include "FWShape.h"
- #endif
-
- #ifndef FWBNDSHP_H
- #include "FWBndShp.h"
- #endif
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export on
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class FW_CLASS_ATTR FW_CGraphicContext;
-
- //========================================================================================
- // class FW_CRoundRectShape
- //========================================================================================
-
- class FW_CLASS_ATTR FW_CRoundRectShape : public FW_CBoundedShape
- {
- public:
- FW_DECLARE_CLASS
-
- //----------------------------------------------------------------------------------------
- // Constructors/Destructors
- //
- public:
- FW_CRoundRectShape(const FW_CRect& rect,
- const FW_CPoint& ovalSize,
- FW_ERenderVerbs renderVerb,
- const FW_PInk& ink = FW_kNormalInk,
- const FW_PStyle& style = FW_kNormalStyle);
-
- FW_CRoundRectShape(const FW_CRoundRectShape& other);
- FW_CRoundRectShape(FW_CReadableStream& archive);
-
- virtual ~ FW_CRoundRectShape();
-
- //----------------------------------------------------------------------------------------
- // Operators
- //
- public:
- FW_CRoundRectShape& operator=(const FW_CRoundRectShape& other);
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- // ----- Hit Testing -----
- virtual FW_Boolean HitTest(FW_CGraphicContext& gc,
- const FW_CPoint& test,
- FW_CFixed tolerance) const;
-
- // ----- Copying -----
- virtual FW_CShape* Copy() const;
-
- // ----- Rendering -----
- virtual void Render(FW_CGraphicContext& gc) const;
-
- // ----- Flatten -----
- virtual void Flatten(FW_CWritableStream& archive) const;
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- public:
- // ----- Rendering -----
- static void RenderRoundRect(FW_CGraphicContext& gc,
- const FW_CRect& rect,
- const FW_CPoint& ovalSize,
- FW_ERenderVerbs renderVerb,
- const FW_PInk& ink = FW_kNormalInk,
- const FW_PStyle& style = FW_kNormalStyle);
-
- // ----- Archiving -----
- static void* Read(FW_CReadableStream& archive);
-
- // ----- Geometry -----
- void SetGeometry(const FW_CRect& rect, const FW_CPoint& ovalSize);
- void GetGeometry(FW_CRect& rect, FW_CPoint& ovalSize) const;
-
- FW_CPoint GetOvalSize() const
- {return fOvalSize;}
- void SetOvalSize(const FW_CPoint& ovalSize)
- {fOvalSize = ovalSize;}
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- FW_CPoint fOvalSize;
- };
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export off
- #endif
-
- #endif
-